﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Security.Cryptography;

namespace CardInChina.Test
{
    [TestClass]
    public class Others
    {
        [TestMethod]
        public void TestMethod1()
        {
            Debug.WriteLine( DateTime.Now.Date.ToString("yyyyMMdd"));
        }

        [TestMethod]
        public void TestMethod2()
        {
            Debug.WriteLine(my_md5("aaa"));
        }


        private string my_md5(string str)
        {
            Byte[] md = (new MD5CryptoServiceProvider()).ComputeHash((System.Text.Encoding.UTF8).GetBytes(str));
            StringBuilder sb = new StringBuilder(BitConverter.ToString(md));
            sb.Replace("-", "");
            return sb.ToString();
        }
    }
}
